<script setup lang="ts">
import { ref } from 'vue';

const foods = ref(['烤肉', '小炒肉', '饺子', '拌面'])
</script>


<template>
  <div>
    <!-- 列表渲染 -->
    <p v-for="(item, index) in foods" :key="item">
      {{ index + 1 }} {{ item }}
    </p>
    <!-- 鸿蒙的列表渲染
      ForEach(this.foods, (item: string, index: number) => {
        Text(item)
      }, (item: string, index) => item) 
    -->
  </div>
</template>
